<ui:composition template="/dynamic/layout/layout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="content">
		<style>
label {
	width: 100px;
	float: left;
	text-align: right;
}
</style>
		<div id="welcome">
			<p style="clear: both" />
		</div>
		<h3>Użytkownik</h3>
		<h:form id="loginForm" prependId="false">
			<p:graphicImage value="#{userMBean.mainPhoto}" width="100"
				height="100" rendered="#{userMBean.mainPhoto ne null}"
				style="margin-left: 50px;">
			</p:graphicImage>
			<p:graphicImage value="/static/css/images/no-photo.jpg" width="100"
				height="100" rendered="#{userMBean.mainPhoto eq null}"
				style="margin-left: 50px;">

			</p:graphicImage>
			<br />
			<br />
			<table>

				<tr>
					<td><label>Login:</label></td>
					<td><p>
							<h:outputText value="#{userMBean.selectedUser.username}" />
						</p></td>
				</tr>
				<tr>
					<td><label>Imie:</label></td>
					<td><p>
							<h:outputText value="#{userMBean.selectedUser.name}" />
						</p></td>
				</tr>
				<tr>
					<td><label>Nazwisko:</label></td>
					<td><p>
							<h:outputText value="#{userMBean.selectedUser.secondName}" />
						</p></td>
				</tr>
				<tr>
					<td><label>Telefon:</label></td>
					<td><p>
							<h:outputText value="#{userMBean.selectedUser.phone}" />
						</p></td>
				</tr>
				<tr>
					<td><label>Email:</label></td>
					<td><p>
							<h:outputText value="#{userMBean.selectedUser.email}" />
						</p></td>
				</tr>
				<tr>
					<td><label>Data urodzenia:</label></td>
					<td><p>
							<h:outputText value="#{userMBean.selectedUser.dateOfBirth}">
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</h:outputText>
						</p></td>
				</tr>
			</table>
			<label>Galeria</label>
			<p:galleria value="#{userMBean.selectedUser.photos}" var="photo"
				rendered="#{not empty userMBean.selectedUser.photos }">
				<p:graphicImage value="#{userMBean.image}">
					<f:param name="imageIdD" value="#{photo.idPhoto}" />
				</p:graphicImage>
			</p:galleria>

		</h:form>

		<div id="main_content"></div>

	</ui:define>
</ui:composition>